import { Component, OnInit } from '@angular/core';
import {Log} from "./log";
import {LogService} from "./log.service";


@Component({
  selector: 'app-log',
  templateUrl: './log.component.html',
  styleUrls: ['./log.component.css']
})
export class LogComponent implements OnInit {

  constructor(
    private logService:LogService
  ) { }

  ngOnInit(): void {
    this.setLogs();
  }

  logs: Log[] = [];

  setLogs(){
    this.logService.httpGetLogs().subscribe((data:Log[])=>this.logs=data);
  }
}
